function showTime() {
	document.getElementById('currentTime').innerHTML = new Date().toUTCString();
}
showTime();
setInterval(function () {
	showTime();
}, 1000);



// anime({
//   targets: ['#ml1-ThrowRadialOuter', '#ml1-ThrowRadialInner'],
//   scaleX: [0, 1],
//   scaleY: [0, 1],
//   duration: 1300,
//   direction: 'alternate',
//   easing: 'linear',
//   loop: true
// });

anime.timeline({
	loop: true
})
	.add({
		targets: ['#ml1-ThrowRadialOuter', '#ml1-ThrowRadialInner'],
		scaleX: [0, 1],
		scaleY: [0, 1],
		duration: 1000,
		easing: 'linear'
	})
	.add({
		targets: ['#ml1-ThrowRadialOuter', '#ml1-ThrowRadialInner'],
		opacity: 0,
		duration: 1000,
		easing: 'linear'
	});

setTimeout(() => {
	// $('.ml1-CommonAnimations_H1TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_H2TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_Line').css('opacity', 0);

	// $('.ml1-CommonAnimations_H1TextWrapper').css('left', 72);
	$('.ml1-CommonAnimations_H2TextWrapper').css('left', 72);
	$('.ml1-CommonAnimations_Line').css('left', 257);



	$('.ml1-CommonAnimations_H2Text').text('进攻');
	anime({
		targets: '#ml1-Possession1',
		d: 'M2,2 266.799173553719,2 267.39421487603306,2 C267.39421487603306,1.4 278.7,28 278.7,28 C279.29504132231403,29 279.29504132231403,30 278.7,31 L267.39421487603306,61 L278.7,88 C279.29504132231403,89 279.29504132231403,90 278.7,91 L267.39421487603306,121 L278.7,146 C279.29504132231403,147 279.29504132231403,150 278.7,151 L267.39421487603306,178 C267.39421487603306,178 2.0,178 2.0,178 L2,2 Z',
		easing: 'easeInQuad',
		duration: 500,
		// delay: 3000
	});

	anime({
		targets: ['.ml1-CommonAnimations_H1TextWrapper'],
		// opacity: [0, 1],
		left: 72,
		easing: 'easeInQuad',
		duration: 500,
	});

	anime({
		targets: ['.ml1-CommonAnimations_H2TextWrapper', '.ml1-CommonAnimations_Line'],
		opacity: [0, 1],
		// left: 72,
		easing: 'easeInQuad',
		duration: 500,
	});

}, 3000);

setTimeout(() => {
	// $('.ml1-CommonAnimations_H1TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_H2TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_Line').css('opacity', 0);

	// $('.ml1-CommonAnimations_H1TextWrapper').css('left', 72);
	$('.ml1-CommonAnimations_H2TextWrapper').css('left', 132);
	$('.ml1-CommonAnimations_Line').css('left', 317);

	// <stop class="gradStart" offset="43.8%" style="stop-opacity: 0.4; stop-color: rgb(24, 84, 53);"></stop>
	// <stop class="gradEnd" offset="100%" style="stop-opacity: 0.4; stop-color: rgb(79, 41, 26);"></stop>

	$('#ml1-Gradient1 .gradStart').attr('offset', '43.8%');
	$('#ml1-Gradient1 .gradStart').attr('style', 'stop-opacity: 0.4; stop-color: rgb(24, 84, 53);');

	$('#ml1-Gradient1 .gradEnd').attr('offset', '100%');
	$('#ml1-Gradient1 .gradEnd').attr('style', 'stop-opacity: 0.4; stop-color: rgb(79, 41, 26);');


	$('.ml1-CommonAnimations_H2Text').text('危险进攻');
	anime({
		targets: '#ml1-Possession1',
		d: 'M2,2 321.04462809917356,2 321.91239669421486,2 C321.91239669421486,1.4 338.40000000000003,28 338.40000000000003,28 C339.26776859504133,29 339.26776859504133,30 338.40000000000003,31 L321.91239669421486,61 L338.40000000000003,88 C339.26776859504133,89 339.26776859504133,90 338.40000000000003,91 L321.91239669421486,121 L338.40000000000003,146 C339.26776859504133,147 339.26776859504133,150 338.40000000000003,151 L321.91239669421486,178 C321.91239669421486,178 2.0,178 2.0,178 L2,2 Z',
		easing: 'easeInQuad',
		duration: 500,
		// delay: 3000
	});

	anime({
		targets: ['.ml1-CommonAnimations_H1TextWrapper'],
		// opacity: [0, 1],
		left: 132,
		easing: 'easeInQuad',
		duration: 500,
	});

	anime({
		targets: ['.ml1-CommonAnimations_H2TextWrapper', '.ml1-CommonAnimations_Line'],
		opacity: [0, 1],
		// left: 72,
		easing: 'easeInQuad',
		duration: 500,
	});

}, 6000);

setTimeout(() => {
	$('.ml1-CommonAnimations_H2TextWrapper').css('opacity', 0);
	$('#ml1-ShotBase').attr('style', 'display: block');

	anime({
		targets: ['.ml1-ShotBase_ShotOffTarget'],
		left: [330, 345],
		easing: 'easeInQuad',
		duration: 500,
	});

	anime({
		targets: ['.ml1-CommonAnimations_H2TextWrapper'],
		opacity: [0, 1],
		easing: 'easeInQuad',
		duration: 500,
	});

	anime({
		targets: ['#ml1-Possession1'],
		opacity: [1, 0],
		// left: 72,
		easing: 'easeInQuad',
		duration: 500,
	});
	$('.ml1-CommonAnimations_H2Text').text('正中靶心');
}, 8000);

// 完场
setTimeout(() => {
	clearInterval(countdownInterval);
	$('.ml1-SoccerClock_Clock').text('00:00');

	$('.ml1-CommonAnimations_H1TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_H2TextWrapper').css('opacity', 0);
	$('.ml1-CommonAnimations_Line').css('opacity', 0);
	$('#ml1-ShotBase').attr('style', 'display: none');

	$('.ml1-CommonAnimations_H2Text').text('完场');
	$('.ml1-CommonAnimations_H2TextWrapper').attr('style',
		'opacity: 1; display: block; text-align: center; left: 40px; top: 79px; width: 320px;');
}, 11000);

//$(document).ready(function() {
var timeString = $('.ml1-SoccerClock_Clock').text();
var timeArray = timeString.split(':');
var minutes = parseInt(timeArray[0]);
var seconds = parseInt(timeArray[1]);
var totalTime = minutes * 60 + seconds;

var countdownInterval = setInterval(function () {
	if (totalTime <= 0) {
		clearInterval(countdownInterval);
		$('.ml1-SoccerClock_Clock').text('00:00');
	} else {
		minutes = Math.floor(totalTime / 60);
		seconds = totalTime % 60;
		$('.ml1-SoccerClock_Clock').text(minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(
			2, '0'));
		totalTime--;
	}
}, 1000);
//});